package com.hxgis.oc.runner;

import com.hxgis.oc.cma.*;
import com.hxgis.oc.config.CmaConfig;

public class CmaRunner {
   public static void runIfSet(){
        if(CmaConfig.getConfig().isSwanEnable()){
            CmaTimer3m.start(new SwanRequest());
        }

        if(CmaConfig.getConfig().isRadarEnable()){
            String[] radars = CmaConfig.getConfig().getRadarStations();
            for(String station : radars){
                CmaTimer3m.start(new RadarRequest(station));
            }
        }

        if(CmaConfig.getConfig().isF2GEnable()){
           CmaTimer3m.start(new FyRequest());
        }

        if(CmaConfig.getConfig().isSurfEleEnable()){
           CmaTimer1h.start(new SurfEleRequest());
        }
   }
}
